<script type="text/javascript">
/**
* Sends an MSN message
*
* @param string Target MSN handle
*
* @return boolean false
*/
var userAgent = navigator.userAgent.toLowerCase();
var is_opera = ((userAgent.indexOf('opera') != -1) || (typeof(window.opera) != 'undefined'));
var is_saf = ((userAgent.indexOf('applewebkit') != -1) || (navigator.vendor == 'Apple Computer, Inc.'));
var is_webtv = (userAgent.indexOf('webtv') != -1);
var is_ie = ((userAgent.indexOf('msie') != -1) && (!is_opera) && (!is_saf) && (!is_webtv));
function SendMSNMessage(name)
{
 if (!is_ie)
 {
 alert("The MSN functions only work when launched from Internet Explorer (MSIE)");
 return false;
 }
 else
 {
 MsgrObj.InstantMessage(name);
 return false;
 }
}

/**
* Adds an MSN Contact (requires MSN)
*
* @param string MSN handle
*
* @return boolean false
*/
function AddMSNContact(name)
{
 if (!is_ie)
 {
 alert("The MSN functions only work when launched from Internet Explorer (MSIE)");
 return false;
 }
 else
 {
 MsgrObj.AddContact(0, name);
 return false;
 }
}
</script>
<?php
$type = $_GET["type"];
switch ($type) {
	case "yahoo":
		yahoo();
		break;
	case "aim":	
		aim();
		break;
	case "icq":
		icq();
		break;
	case "skype":
		skype();
		break;
	case "msn":
		msn();
		break;
}
function yahoo() {
//	ymsgr:sendIM?leanhtuanart81
	$username = $_GET["user"];
	$yahoo = $_GET["yahoo"];
	?>
	<table width="100%" cellspacing="1" cellpadding="6" border="0" align="center" class="tborder">
<tbody>
<tr>
	<td align="center" class="panelsurround">
	<div class="panel">
		<div align="left">
		<div class="fieldset">
			<span style="float: right;"><img border="0" alt="Online Status" src="http://opi.yahoo.com/online?u=<?php echo $yahoo?>&m=g&t=2"/></span>
			<img alt="" src="images/im_yahoo.gif"/>
			通过雅虎发送信息至 <a target="_blank" href="profile.php?u=<?php echo $username?>"><strong><?php echo $username?></strong></a> (<strong dir="ltr"><?php echo $yahoo?></strong>)
		</div>
		
		<div class="fieldset"><a onclick="window.close(); return true;" target="_blank" href="http://members.yahoo.com/interests?.oc=t&.kw=<?php echo $yahoo?>&.sb=1"> 查看 <span dir="ltr"><?php echo $yahoo?></span></a><a onclick="window.close(); return true;" target="_blank" href="http://members.yahoo.com/interests?.oc=t&amp;.kw=<?php echo $yahoo?>&amp;.sb=1"> 简介</a></div>
		
		<div class="fieldset"><a href="ymsgr:sendIM?<?php echo $yahoo?>">给<span dir="ltr"> <?php echo $yahoo?></span>   </a><a href="ymsgr:sendIM?<?php echo $yahoo?>"> 发送</a><a href="ymsgr:sendIM?<?php echo $yahoo?>">信息 </a></div>
		
		</div>
	</div>
	</td>
</tr>
</tbody></table>
	<?php
}

function skype() {
	$username = $_GET["user"];
	$skype = $_GET["skype"];	
	?>
	<table width="100%" cellspacing="1" cellpadding="6" border="0" align="center" class="tborder">
<tbody>
<tr>
	<td align="center" class="panelsurround">
	<div class="panel">
		<div align="left">

		<table width="404" border="0" cellpadding="0" cellspacing="6">
		<tbody><tr>
			<td width="24"><img alt="Skype? class="inlineimg" src="images/im_skype.gif"/></td>
			<td style="padding: 0px;" class="fieldset" colspan="3">通过Skype发送信息至 <a target="_blank" href="profile.php?u=<?php echo $username?>"><strong><?php echo $username?></strong></a> (<strong dir="ltr"><?php echo $skype?></strong>)</td>
		</tr>
		<tr>
			<td style="border: 1px inset ; color: black; background-color: white; text-align: center;" colspan="4">
				<a target="_blank" href="http://www.skype.com"><img border="0" alt="Online Status" src="http://mystatus.skype.com/<?php echo $skype?>.png"/></a>
			</td>
		</tr>
		<tr valign="bottom">
			<td><a onclick="return skypeCheck();" href="skype:<?php echo $skype?>?userinfo"><img border="0" alt="View Skype profile" src="images/skype/skype_info.gif"/></a></td>
			<td width="139" class="smallfont"><a onclick="return skypeCheck();" href="skype:<?php echo $skype?>?userinfo"> 查看Skype公司简介 </a></td>
			<td width="27"><a onclick="return skypeCheck();" href="skype:<?php echo $skype?>?add"><img border="0" alt="Add to Skype contact list" src="images/skype/skype_addcontact.gif"/></a></td>
			<td width="190" class="smallfont"><a onclick="return skypeCheck();" href="skype:<?php echo $skype?>?add"> 添加到Skype联系人名单 </a></td>
		</tr>
		<tr valign="bottom">
			<td><a onclick="return skypeCheck();" href="skype:<?php echo $skype?>?call"><img border="0" alt="Start Skype voice call" src="images/skype/skype_callstart.gif"/></a></td>
			<td class="smallfont"><a onclick="return skypeCheck();" href="skype:<?php echo $skype?>?call"> 启动Skype语音通话 </a></td>
			<td><a onclick="return skypeCheck();" href="skype:<?php echo $skype?>?chat"><img border="0" alt="Start Skype text chat" src="images/skype/skype_message.gif"/></a></td>
			<td class="smallfont"><a onclick="return skypeCheck();" href="skype:<?php echo $skype?>?chat"> 启动Skype的文本聊天 </a></td>
		</tr>
		<tr valign="bottom">
			<td><a onclick="return skypeCheck();" href="skype:<?php echo $skype?>?voicemail"><img border="0" alt="Leave voicemail using Skype" src="images/skype/skype_voicemail.gif"/></a></td>
			<td class="smallfont"><a onclick="return skypeCheck();" href="skype:<?php echo $skype?>?voicemail">使用Skype语音邮件 </a></td>
			<td><a onclick="return skypeCheck();" href="skype:<?php echo $skype?>?sendfile"><img border="0" alt="Send a file using Skype" src="images/skype/skype_fileupload.gif"/></a></td>
			<td class="smallfont"><a onclick="return skypeCheck();" href="skype:<?php echo $skype?>?sendfile">使用Skype发送文件</a></td>
		</tr>
		<tr>
			<td class="fieldset" colspan="4"> 这些功能要求<a target="_blank" href="http://www.skype.com"> Skype </a>  要安装。 </td>
		</tr>
		</tbody></table>
				
		</div>
	</div>
	</td>
</tr>
</tbody></table>
	<?php
}

function msn() {
	$username = $_GET["user"];
	$msn = $_GET["msn"];
	?>
	<table width="100%" cellspacing="1" cellpadding="6" border="0" align="center" class="tborder">
<tbody>
<tr>
	<td align="center" class="panelsurround">
	<object id="MsgrObj" height="0" width="0" codetype="application/x-oleobject" classid="clsid:B69003B3-C55E-4B48-836C-BC5946FC3B28"/></object>
	<div class="panel">
		<div align="left">
		
		<div class="fieldset">
			<img alt="" src="images/im_msn.gif"/> 通过MSN发送<span class="fieldset" style="padding: 0px;">信息至</span> <a target="_blank" href="profile.php?u=<?php echo $username?>"><strong><?php echo $username?></strong></a> <span style="white-space: nowrap;">(<strong dir="ltr"><?php echo $msn?></strong>)</span>
		</div>
		
		<div class="fieldset"><a onclick="AddMSNContact('<?php echo $msn?>'); return false;" href="#"> 添加 <span dir="ltr"><?php echo $msn?></span> 到您的联系人名单 </a></div>
		
		<div class="fieldset"><a onclick="SendMSNMessage('<?php echo $msn?>'); return false;" href="#">给 <span dir="ltr"><?php echo $msn?></span> 发送信息</a></div>
		
		<div class="fieldset">
			请注意，这些功能都需要您可以登录到任何的MSN Messenger或Windows Messenger。否则你的信息将无法发送到电子邮件地址，请登录到您的MSN/Windows Messenger。</div>
				
		</div>
	</div>
	</td>
</tr>
</tbody></table>
	<?php
}

function aim() {
	$username = $_GET["user"];
	$aim = $_GET["aim"];
	?>
<table width="100%" cellspacing="1" cellpadding="6" border="0" align="center" class="tborder">
<tbody>
<tr>
	<td align="center" class="panelsurround">
	<div class="panel">
		<div align="left">
		
		<div class="fieldset">
			<img alt="" src="images/im_aim.gif"/>
			通过AIM<span class="fieldset" style="padding: 0px;">发送信息至</span> <a target="_blank" href="profile.php?u=<?php echo $username?>"><strong><?php echo $username?></strong></a> (<strong dir="ltr"><?php echo $aim?></strong>)
		</div>
		
		<div class="fieldset"><a onclick="AddMSNContact('<?php echo $msn?>'); return false;" href="#">添加 </a><a href="aim:addbuddy?screenname=<?php echo $aim?>"><span dir="ltr"><?php echo $aim?></span></a><a onclick="AddMSNContact('<?php echo $msn?>'); return false;" href="#"> 到您的联系人名单</a></div>
		
		<div class="fieldset"><a onclick="SendMSNMessage('<?php echo $msn?>'); return false;" href="#">给</a> <a href="aim:goim?screenname=<?php echo $aim?>&message=Hi.+Are+you+there?"><span dir="ltr"><?php echo $aim?></span></a><a onclick="SendMSNMessage('<?php echo $msn?>'); return false;" href="#"> 发送信息</a></div>
		
		<div class="fieldset">
			请注意，这些功能都需要在你的计算机上安装AOL即时通信应用程序。</div>
		
		</div>
	</div>
	</td>
</tr>
</tbody></table>
	<?php
}
?>